// EcoModeler - C# Edition :: Version 9.16 build 3301
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using Eco.Services;
using Eco.ObjectRepresentation;
using Eco.ObjectImplementation;
using Eco.UmlRt;
using Eco.UmlCodeAttributes;
using Eco.Subscription;

namespace TTServer
{
	#region MM_ECO_Generated
	#region Attributes
	[UmlElement(Id="{e4ac99b4-6e20-4ab6-9812-85fbc97a1107}")]
	[UmlTaggedValue("Eco.TableMapping", "Parent")]
	#endregion

	#region Documentation
	//1 Sportverband
	/// Sportverband, meist der RTTV
	#endregion

	#endregion
	public class Verband: Organisation
	{
		#region MM_ECO AutoGenerated ECO code

		new public struct Eco_LoopbackIndices
		{
			public const int Eco_FirstMember = TTServer.Organisation.Eco_LoopbackIndices.Eco_MemberCount;
			public const int Eco_MemberCount = (Eco_FirstMember + 4);
			public const int Dachverband_MemberIndex = Eco_FirstMember + 0;
			public const int Region_MemberIndex = Eco_FirstMember + 1;
			public const int Spieldimension_MemberIndex = Eco_FirstMember + 2;
			public const int Verein_MemberIndex = Eco_FirstMember + 3;
		}
		#endregion

		#region MM_ECO Model owned attributes
		//Note: Do not remove any property within this region, nor change its signature

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Verband.Eco_LoopbackIndices.Verein_MemberIndex), Id="{3c8263aa-753f-4acc-8632-8c7f65c465d2}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.Verbandszugehoerigkeit), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Verein> Verein
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Verein>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Verein_MemberIndex)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Verband.Eco_LoopbackIndices.Dachverband_MemberIndex), Id="{ef5cb8b5-9902-48ec-91ad-590c09da8fa2}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.VerbandVerband), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Verband> Dachverband
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Verband>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Dachverband_MemberIndex)));
				#endregion
			}
		}


		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Verband.Eco_LoopbackIndices.Region_MemberIndex), Id="{533bfd19-52c4-4d84-8ffa-2e0127c2f68d}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.VerbandVerband), Index=0)]
		[UmlMetaAttribute("multiplicity", "1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.Verband Region
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.Verband) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Region_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Region_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Verband.Eco_LoopbackIndices.Spieldimension_MemberIndex), Id="{9512a0e8-4e73-4d07-b2b2-cc2ff685596d}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.VerbandSpieldimension), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Spieldimension> Spieldimension
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Spieldimension>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Spieldimension_MemberIndex)));
				#endregion
			}
		}
		#endregion

		#region MM_ECO Model owned methods
		//Note: Do not remove any method within this region, nor change its signature

		public Verband(IContent content) : base(content)
		{
			#region MM_ECO_Generated
			#endregion
		}

		public Verband(IEcoServiceProvider serviceProvider) : base(serviceProvider)
		{
			try
			{
				// Place user code ONLY here
			}
			catch (System.Exception)
			{
				this.Deinitialize(serviceProvider);
				throw;
			}
		}
		#endregion
	}
}
